const cont = document.querySelector(".like .cont")
    class Like{
        constructor(ops){

            this.load();

        }
        load(){
            ajax("http://localhost:3000/getGoods", res => {
                this.res = JSON.parse(res).data;
                this.render();
            })
        }
        render(){
            let str = "";
            for(let i = 0;i<12;i++){
                str += `<div class="cont_box">
                            <a href = "http://localhost:3000/info.html?${this.res[i].Id}">
                                <img src="${this.res[i].img_001}" alt="">
                                <p>${this.res[i].info}</p>
                                <span>￥${this.res[i].price}</span>
                            </a>    
                        </div>`
            }
            cont.innerHTML = str;
        }
    }
    new Like({});